package controllers

import (
	"{{.ProjectName}}/services"

	"gitee.com/wu-jin-feng/fgin"
	"github.com/gin-gonic/gin"
)

type PublicController struct{}

func (c *PublicController) Ping(ctx *gin.Context) {
	svc := &services.PublicService{}
	out, err := svc.Ping(ctx)
	if err != nil {
		fgin.ReturnJson(ctx, 400, "", err)
		return
	}
	fgin.ReturnJson(ctx, 200, out, nil)
}
